<?php

namespace App\Http\Controllers\Admin\Setting\Wechat;

use App\Http\Controllers\Admin\Controller;
use App\Repositories\WechatDraftRepository;
use Illuminate\Http\Request;
use Inertia\Response;

class WeChatReleaseController extends Controller
{
    public function __construct(Request $request, WechatDraftRepository $repository)
    {
        $this->request = $request;
        $this->repository = $repository;
    }
    public function index(): Response
    {
        $list = $this->repository->getList();
        return $this->inertia('wechat/release/index',[
            'data' => $list->items(),
            'pagination' => [
                'total' => $list->total(),
                'page' => $list->currentPage(),
                'pageSize' => $list->perPage(),
            ],
        ]);
    }
}
